home *** CD-ROM | disk | FTP | other *** search
- --= SID = SIMTEL20 Ada Software Repository Item Description File = SID =--
- -- UNIT NAME : COUNT_OF_ADA_STATEMENTS_2
- -- VERSION : 1.0
- -- REVIEW CODE :
- -- DDN ADDRESS : RCONN at SIMTEL20
- -- AUTHOR : Richard Conn
- -- : TI Ada Technology Branch
- -- : Box 801, MS 8007
- -- : McKinney, TX 75069
- -- COPYRIGHT :
- -- DATE CREATED : 14 Feb 85
- -- DATE RELEASED : 15 Feb 85
- -- DATE LAST UPDATED : 15 Feb 85
- -- LOCATION : C2MUG
- -- LOCATION : ASR
- -- ENVIRONMENT : DEC VAX/VMS, DEC Ada
- --= CLASSIFICATION ===============================================--
- -- CATEGORY LEVEL 1 : COMPONENTS
- -- CATEGORY LEVEL 2 : COUNT Ada STATEMENTS
- -- CATEGORY LEVEL 3 : Count of Ada Statements 2
- -- CATEGORY LEVEL 4 :
- -- KEYWORD : Source analysis
- -- KEYWORD : Quantity
- -- KEYWORD : Statements
- -- INDEX : CAS2
- -- INDEX : Source Analysis
- -- INDEX : Analysis, Source
- -- INDEX : Quantity
- -- INDEX : Statements
- -- TAXONOMY :
- -- DEPENDENCIES :
- -- SEE ALSO : PD:<ADA.COMPONENTS>CAS3, PD:<ADA.COMPONENTS>COUNTADA
- --= FILE LISTING ===============================================--
- -- FILE SPECS : PD:<ADA.COMPONENTS>CAS2.*
- -- DIRECTORY DISPLAY :
- -- Directory PD:<ADA.COMPONENTS>
- -- File Name Byte Count Line Count
- -- --------------- ---------- ----------
- -- CAS2.ADA 6942 190
- -- CAS2.PRO 2452 62
- -- =============== ========== ==========
- -- 2 Files 9394 252
- --= ABSTRACT ===============================================--
- -- This procedure calculates the "STATEMENTS" of a valid Ada
- -- fragment specified by a FILE_NAME string parameter. It need not be a
- -- complete compilation unit, but it should have closed all open parens
- -- and strings.
- --
- -- The Ada statement is defined by a semicolon terminator outside
- -- of comments, parentheses, or string or character literals. This
- -- definition is insensitive to formatting or layout of the source.
- --
- -- There are exotic cases for which this will misestimate the
- -- count but we have never encountered one in real code.
- --
- -- This procedure is derived from Bill Whitaker's original
- -- COUNT_OF_ADA_STATEMENTS, and it does not change his original
- -- algorithm. It adds a line count and a character-checksum hash (sum of
- -- POS values of all non-space characters in the file mod 256).
- --= REVISION HISTORY ===============================================--
- --
- -- Derivation : COUNT_OF_ADA_STATEMENTS by Bill Whitaker
- --
- -- DATE VERSION AUTHOR HISTORY
- -- 19850215 1.0 R Conn Initial Release
- --
- --= RELEASE NOTICE ===============================================--
- -- This software is released to the Public Domain (note:
- -- software released to the Public Domain is not subject
- -- to copyright protection).
- --= DISCLAIMER ===============================================--
- -- This software and its documentation are provided "AS IS" and
- -- without any expressed or implied warranties whatsoever. No warranties
- -- as to performance, merchantability, or fitness for a particular
- -- purpose exist.
- -- The user is advised to test the software thoroughly before
- -- relying on it. The user must assume the entire risk and liability of
- -- using this software. In no event shall any person or organization of
- -- people be held responsible for any direct, indirect, consequential or
- -- inconsequential damages or lost profits.
- --======================================================================--
-